package com.designpattern.demo.ui.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatButton;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.designpattern.demo.R;
import com.designpattern.demo.R2;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by lingchen on 2019/11/24. 22:25
 * mail:lingchen52@foxmail.com
 */
public class DesignPatternListAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    @BindView(R2.id.btn_name)
    AppCompatButton mTvName;

    public DesignPatternListAdapter(@Nullable List<String> data) {
        super(R.layout.item_design_pattern_list, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, String s) {
        ButterKnife.bind(this, baseViewHolder.itemView);
        mTvName.setText(s);
    }
}
